.class public Lcom/estrongs/android/dlna/c;
.super Ljava/lang/Object;
.source "ESDlnaManager.java"


# static fields
.field private static d:Lcom/estrongs/android/dlna/c;


# instance fields
.field private a:Z

.field private b:Lcom/estrongs/dlna/render/player/MediaPlayers;

.field private c:Lcom/estrongs/android/dlna/b;


# direct methods
.method private constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    invoke-static {}, Lcom/estrongs/android/util/o0;->d()Z

    move-result v0

    iput-boolean v0, p0, Lcom/estrongs/android/dlna/c;->a:Z

    return-void
.end method

.method public static g()Lcom/estrongs/android/dlna/c;
    .locals 2

    .line 1
    sget-object v0, Lcom/estrongs/android/dlna/c;->d:Lcom/estrongs/android/dlna/c;

    if-nez v0, :cond_1

    .line 2
    const-class v0, Lcom/estrongs/android/dlna/c;

    monitor-enter v0

    .line 3
    :try_start_0
    sget-object v1, Lcom/estrongs/android/dlna/c;->d:Lcom/estrongs/android/dlna/c;

    if-nez v1, :cond_0

    .line 4
    new-instance v1, Lcom/estrongs/android/dlna/c;

    invoke-direct {v1}, Lcom/estrongs/android/dlna/c;-><init>()V

    sput-object v1, Lcom/estrongs/android/dlna/c;->d:Lcom/estrongs/android/dlna/c;

    .line 5
    :cond_0
    monitor-exit v0

    goto :goto_0

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1

    .line 6
    :cond_1
    :goto_0
    sget-object v0, Lcom/estrongs/android/dlna/c;->d:Lcom/estrongs/android/dlna/c;

    return-object v0
.end method


# virtual methods
.method public a()V
    .locals 1

    .line 12
    iget-object v0, p0, Lcom/estrongs/android/dlna/c;->b:Lcom/estrongs/dlna/render/player/MediaPlayers;

    if-eqz v0, :cond_0

    .line 13
    invoke-virtual {v0}, Lcom/estrongs/dlna/render/player/MediaPlayers;->confirmPlay()V

    :cond_0
    return-void
.end method

.method public a(Landroid/content/Context;)V
    .locals 2

    const/4 v0, 0x0

    .line 1
    sput-boolean v0, Les/m10;->a:Z

    .line 2
    iget-boolean v0, p0, Lcom/estrongs/android/dlna/c;->a:Z

    if-eqz v0, :cond_0

    .line 3
    new-instance v0, Lcom/estrongs/android/dlna/ESMediaPlayers;

    invoke-direct {v0}, Lcom/estrongs/android/dlna/ESMediaPlayers;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/dlna/c;->b:Lcom/estrongs/dlna/render/player/MediaPlayers;

    .line 4
    invoke-static {}, Lcom/estrongs/dlna/render/DlnaRenderManager;->f()Lcom/estrongs/dlna/render/DlnaRenderManager;

    move-result-object v0

    iget-object v1, p0, Lcom/estrongs/android/dlna/c;->b:Lcom/estrongs/dlna/render/player/MediaPlayers;

    invoke-virtual {v0, v1}, Lcom/estrongs/dlna/render/DlnaRenderManager;->a(Lcom/estrongs/dlna/render/player/MediaPlayers;)V

    .line 5
    invoke-static {}, Lcom/estrongs/dlna/render/DlnaRenderManager;->f()Lcom/estrongs/dlna/render/DlnaRenderManager;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/estrongs/dlna/render/DlnaRenderManager;->a(Landroid/content/Context;)V

    goto :goto_0

    .line 6
    :cond_0
    invoke-static {}, Les/g10;->e()Les/g10;

    move-result-object v0

    new-instance v1, Lcom/estrongs/android/dlna/d;

    invoke-direct {v1}, Lcom/estrongs/android/dlna/d;-><init>()V

    invoke-virtual {v0, v1}, Les/g10;->a(Les/k10;)V

    .line 7
    invoke-static {}, Les/g10;->e()Les/g10;

    move-result-object v0

    invoke-virtual {v0, p1}, Les/g10;->a(Landroid/content/Context;)V

    .line 8
    :goto_0
    new-instance p1, Lcom/estrongs/android/dlna/b;

    invoke-direct {p1}, Lcom/estrongs/android/dlna/b;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/dlna/c;->c:Lcom/estrongs/android/dlna/b;

    .line 9
    invoke-static {}, Lcom/estrongs/dlna/core/b;->g()Lcom/estrongs/dlna/core/b;

    move-result-object p1

    iget-object v0, p0, Lcom/estrongs/android/dlna/c;->c:Lcom/estrongs/android/dlna/b;

    invoke-virtual {p1, v0}, Lcom/estrongs/dlna/core/b;->a(Les/e10;)V

    return-void
.end method

.method public a(Landroid/content/Context;Lcom/estrongs/fs/g;Les/h10;)V
    .locals 1

    if-eqz p2, :cond_1

    .line 14
    invoke-interface {p2}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    goto :goto_0

    .line 15
    :cond_0
    new-instance v0, Lcom/estrongs/android/ui/dlna/dialog/c;

    invoke-direct {v0, p1, p2, p3}, Lcom/estrongs/android/ui/dlna/dialog/c;-><init>(Landroid/content/Context;Lcom/estrongs/fs/g;Les/h10;)V

    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q;->show()V

    return-void

    :cond_1
    :goto_0
    if-eqz p3, :cond_2

    .line 16
    invoke-interface {p3}, Les/h10;->a()V

    :cond_2
    return-void
.end method

.method public a(Lcom/estrongs/dlna/render/player/b;)V
    .locals 1

    .line 10
    iget-object v0, p0, Lcom/estrongs/android/dlna/c;->b:Lcom/estrongs/dlna/render/player/MediaPlayers;

    if-eqz v0, :cond_0

    .line 11
    invoke-virtual {v0, p1}, Lcom/estrongs/dlna/render/player/MediaPlayers;->registerPlayerProxy(Lcom/estrongs/dlna/render/player/b;)V

    :cond_0
    return-void
.end method

.method public a(Les/l10;)V
    .locals 1

    .line 23
    invoke-static {}, Les/g10;->e()Les/g10;

    move-result-object v0

    invoke-virtual {v0, p1}, Les/g10;->b(Les/l10;)V

    return-void
.end method

.method public a(Les/l10;Lcom/estrongs/fs/g;Les/h10;)V
    .locals 3

    if-eqz p2, :cond_2

    .line 17
    invoke-interface {p2}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    goto :goto_0

    .line 18
    :cond_0
    invoke-virtual {p0}, Lcom/estrongs/android/dlna/c;->b()Les/l10;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 19
    invoke-virtual {v0, p1}, Les/l10;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    invoke-virtual {v0}, Les/l10;->g()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 20
    invoke-static {}, Les/g10;->e()Les/g10;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, v0, v2}, Les/g10;->b(Les/l10;Les/h10;)Z

    .line 21
    :cond_1
    invoke-static {}, Les/g10;->e()Les/g10;

    move-result-object v0

    invoke-interface {p2}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {v0, p1, p2, p3}, Les/g10;->a(Les/l10;Ljava/lang/String;Les/h10;)Z

    return-void

    :cond_2
    :goto_0
    if-eqz p3, :cond_3

    .line 22
    invoke-interface {p3}, Les/h10;->a()V

    :cond_3
    return-void
.end method

.method public b()Les/l10;
    .locals 1

    .line 1
    invoke-static {}, Les/g10;->e()Les/g10;

    move-result-object v0

    invoke-virtual {v0}, Les/g10;->c()Les/l10;

    move-result-object v0

    return-object v0
.end method

.method public c()Ljava/lang/String;
    .locals 1

    .line 1
    invoke-static {}, Lcom/estrongs/dlna/core/b;->g()Lcom/estrongs/dlna/core/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/dlna/core/b;->c()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public d()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Lcom/estrongs/android/dlna/c;->a:Z

    return v0
.end method

.method public e()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/dlna/c;->b:Lcom/estrongs/dlna/render/player/MediaPlayers;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Lcom/estrongs/dlna/render/player/MediaPlayers;->refusePlay()V

    :cond_0
    return-void
.end method

.method public f()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/dlna/c;->b:Lcom/estrongs/dlna/render/player/MediaPlayers;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Lcom/estrongs/dlna/render/player/MediaPlayers;->unRegisterPlayerProxy()V

    :cond_0
    return-void
.end method
